<%--
  Created by IntelliJ IDEA.
  User: 17728
  Date: 2020/10/12
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <%@ include file="/pages/common/head.jsp" %>
    <link type="text/css" rel="stylesheet" href="static/css/style.css">
    <script type="text/javascript">
        $(function () {
            // 给 【删除】绑定单击事件
            $("a.deleteItem").click(function () {
                return confirm("你确定要删除 【" + $(this).parent().parent().find("td:first").text() + "】吗?")
            });
        });
    </script>
    <style type="text/css">
        .a {
            width: 60vw;
            height: 550px;
            margin: 0 auto;
            position: relative;
            top: 50px;
        }

        .b {

            height: 480px;
        }

        .d {
            text-align: center;
            position: relative;
            bottom: 0px;

        }
    </style>
</head>
<body>
<div class="a">
    <div class="b">
        <table align="center" class="table table-hover">
            <thead>
            <td colspan="8" align="center"><h3><a href="pages/admin/teacher/admin_teacher_edit.jsp">添加教师信息</a></h3></td>

            <tr>
                <td>id</td>
                <td>uid</td>
                <td>name</td>
                <td>sex</td>
                <td>age</td>
                <td>pwd</td>
                <td>修改</td>
                <td>删除</td>
            </tr>
            </thead>

            <c:forEach items="${requestScope.teachers}" var="teachers">
                <tr>
                    <td>${teachers.id}</td>
                    <td>${teachers.uId}</td>
                    <td>${teachers.name}</td>
                    <td>${teachers.sex}</td>
                    <td>${teachers.age}</td>
                    <td>${teachers.pwd}</td>
                    <td><a href="TeacherServlet?action=queryTeacherById&id=${teachers.id}">修改</a></td>
                    <td><a class="deleteItem" href="TeacherServlet?action=deleteTeacher&id=${teachers.id}">删除</a></td>
                </tr>
            </c:forEach>


        </table>
    </div>

</div>

</body>
</html>

